package com.xyoto.takeawayBusiness.mapper;

import com.xyoto.takeawayBusiness.dto.ShoppingPropDto;
import com.xyoto.takeawayBusiness.dto.ShoppingSpecDto;
import com.xyoto.takeawayBusiness.entity.ShoppingGoods;
import com.xyoto.takeawayBusiness.vo.ShoppingGoodsVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @ClassName:
 * @Author: 挽风
 * @Date: 2022
 * @Copyright: 2022 by 挽风
 * @Description:
 **/
public interface ShoppingGoodsMapper {

    /**
     * 批量添加商品规格
     * @param shoppingGoodsList
     * @return
     */
    Integer batchGoods(@Param("shoppingGoodsList") List<ShoppingGoods> shoppingGoodsList);

    /**
     * 删除商品规格
     * @param id
     * @return
     */
    Integer removeGoods(Integer id);

    /**
     * 删除当前商品的所有商品规格
     * @param shoppingId
     * @return
     */
    Integer deleteGoodsByShoppingId(Integer shoppingId);

    /**
     * 新增规格
     * @param shoppingSpecDto
     * @return
     */
    Integer saveGoods(ShoppingGoods shoppingSpecDto);

    /**
     * 查询商品规格
     * @param id
     * @return
     */
    List<ShoppingGoodsVO> getShoppingGoods(Integer id);

    /**
     * 修改商品规格
     * @param shoppingGoods
     * @return
     */
    Integer updateGoods(ShoppingGoods shoppingGoods);

    /**
     * 新增商品规格
     * @param shoppingGoods
     * @return
     */
    Integer addProdGoods(ShoppingGoods shoppingGoods);
}
